home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.neu.edu!ghull
- From: ghull@lynx.dac.neu.edu (Gregory Hull)
- Newsgroups: comp.sys.amiga.programmer
- Subject: GNU ld cannot find ____main
- Date: 5 Apr 1996 14:00:45 GMT
- Organization: Northeastern University, Boston, MA. 02115, USA
- Message-ID: <4k392d$8q6@chaos.dac.neu.edu>
- NNTP-Posting-Host: lynx.dac.neu.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- I've installed the GNU C compiler on my amiga, along wit" 'KRUEMEL's
- FRONTEND for THE GNU C COMPILER" and I can compile code fine, but when it
- is time to link I keep getting plagued bu the following error:
-
-
- T:first.o: Undefined symbol _ main referenced from text segment]
- LD returned error 1.
-
- first.c is a simple 'Hello, world' program that I've just been using to
- test the installation of my C compiler. I've found a few objects in the
- gnu directory that have ____main defined in them, but when I include them
- in the link I just get more errors.
-
- These are my frontend settings for the compiler:
-
- GNU PreProcessor:
- gcc:lib/gcc-lib/mc68020-cbm-amigados/2.7.0/cpp
-
- GNU Compiler Stage 1:
- gcc:lib/gcc-lib/mc68020-cbm-amigados/2.7.0/cc1
-
- GNU Assembler:
- gcc:bin/as
-
- GNU Object Linker:
- gcc:bin/ld
-
- Linker Libraries and Flags:
- -nostdlib -Lgcc:lib/libb -lc -Lgcc:os-lib -lamiga -s
-
- PreProcessor Flags:
- -nostdinc -Igcc:include -DAMIGA -Damiga -Dmc68000 -D__GNUC__
-
- Compiler Flags:
- -m68000 -msoft-float -Wall -fvolatile
-
- Assembler Flags:
- -mc68000
-
- Header file to link first:
- gcc:lib/crt0.o
-
- Optimize flags (activated by '-O#'):
- -fomit-frame-pointer -funroll-loops
-
- Default Stack Size:
- 140000
-
-
- So, if I ma making some obvious mistake or if anyone has any clues
- as to what I need to link, or change in other areas to, in order to
- resolve my problem, please let me know. Thanx.
-
- Greg Hull
- Northeastern College of Computer Science, Boston MA
- Lotus Corp, Cambridge MA
-
-
-